import request from '@/utils/request'

export function getList(params) {
	return request({
		url: '/category/page',
		method: 'get',
		params: params
	})
}

export function getCategoryById(params) {
	return request({
		url: '/category/getCategoryById',
		method: 'get',
		params: params
	})
}

export function deleteCategoryById(params) {
	return request({
		url: '/category/deleteCategoryById',
		method: 'delete',
		params: params
	})
}

export function addCategory(params) {
	return request({
		url: '/category/addCategory',
		method: 'post',
		data: params
	})
}

export function editCategory(params) {
	return request({
		url: '/category/editCategory',
		method: 'post',
		data: params
	})
}

export function getListByType(params) {
	return request({
		url: '/category/list',
		method: 'get',
		params: params
	})
}